<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<title>Stoffel Lefebvre Architecture - Documents du projet LES PIEUX</title>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" href="css/3.css" type="text/css" media="screen,projection" />
	<script type="text/javascript" src="file_management.js"></script>
	<script type="text/javascript">
	
	var doc_baselink = "doc/";
	
		function makeObject(names)
		{
			var names = names.split(' ');
			var count = names.length;

			function constructor()
			{
				for (var i = 0; i < count; i++)
				{
					this[names[i]] = arguments[i];
				}
			}
			return constructor;
		}

		var Doc = makeObject("id id_lot desc indice type format date archi bet bc");
		var Lot = makeObject("id name");
		
		var listOfLot = [new Lot(0, "Stoffel Lefebvre<br /> Architectes"),
						 new Lot(1, "Lot 1<br />VRD<br /> Meslin"),
						 new Lot(2, "Lot 2<br />GROS OEUVRE<br /> Landron"),
						 new Lot(3, "Lot 3<br />CHARPENTE METALLIQUE<br /> Satim"),
						 new Lot(4, "Lot 4<br />COUVERTURE ETANCHEITE<br /> Seb"),
						 new Lot(5, "BARDAGE ITE<br /> Corbet"),
						 new Lot(6, "BARDAGE ITE<br /> Corbet"),
						 new Lot(7, "BARDAGE ITE<br /> Corbet"),
						 new Lot(8, "BARDAGE ITE<br /> Corbet")];
		
		var listOfDoc = [new Doc(0, 0, "PRO ter", "Plan zone A", "pdf", "DCE", 1, 3, 3),
			new Doc(1, 1, "Essais de portance dynaplaque", "ind3", "DOC TECH", "pdf", "13/12/13", 3, 3, 3),
			new Doc(2, 2, "implantation grue", "ind1", "PLAN", "tirage", "06/11/13", 1, 3, 3),
			new Doc(3, 3, "plan et ax0 de flocage", "ind2", "DOC TECH", "pdf", "06/06/14", 3, 3, 3),
			new Doc(4, 4, "Dossier Technique Plans cahier 21p", "ind4", "DOC TECH PLANS", "pdf", 1, 1, 3, 3),
			new Doc(5, 5,"cahier 16p", "ind4", "CAHIER TECH", "pdf", "12/12/13", 1, 3, 1),
			new Doc(6, 6, "cahier 16p", "ind4", "CAHIER TECH", "pdf", "12/12/13", 1, 3, 1),
			new Doc(7, 7,"cahier 16p", "ind4", "CAHIER TECH", "pdf", "12/12/13", 1, 3, 1),
			new Doc(8, 8, "cahier 16p", "ind4", "CAHIER TECH", "pdf", "12/12/13", 1, 3, 1),
			new Doc(9, 4, "plan et ax0 de flocage", "ind3", "DOC TECH", "pdf", "06/06/14", 3, 3, 3),
			new Doc(10, 4, "plan et ax0 de flocage", "ind3", "DOC TECH", "pdf", "06/06/14", 3, 3, 3),
			new Doc(11, 4, "plan et ax0 de flocage", "ind3", "DOC TECH", "pdf", "06/06/14", 3, 2, 3),
			new Doc(12, 4, "plan et ax0 de flocage", "ind3", "DOC TECH", "pdf", "06/06/14", 1, 3, 3),
			new Doc(13, 4, "plan et ax0 de flocage", "ind3", "DOC TECH", "pdf", "06/06/14", 3, 1, 1),
			new Doc(14, 4, "plan et ax0 de flocage", "ind3", "DOC TECH", "pdf", "06/06/14", 2, 1, 3),
			new Doc(15, 4, "plan et ax0 de flocage", "ind3", "DOC TECH", "pdf", "06/06/14", 2, 3, 1),
			new Doc(16, 4, "plan et ax0 de flocage", "ind3", "DOC TECH", "pdf", "06/06/14", 3, 3, 3),
			new Doc(17, 4, "plan et ax0 de flocage", "ind3", "DOC TECH", "pdf", "06/06/14", 3, 3, 3),
			new Doc(18, 4, "plan et ax0 de flocage", "ind4", "Last DOC TECH", "pdf", "06/06/14", 3, 3, 3)];
			
		var openedfolder = 0;
		
		function getlibele(value)
		{
			if (value == 1)
				return ("<span class=\"valide\">Validé</span>");
			else if (value == 2)
				return ("<span class=\"encours\">En Cours</span>");
			else
				return ("<span class=\"suspendu\">Suspendu</span>");
		}
		
		function getredirect(id)
		{
			 return "document.location.href = '" + doc_baselink + id.toString() + "';";
		}
		
		function setfolder(id)
		{
			openedfolder = id;
		
			var body = document.getElementById("docs");
			body.innerHTML = "";
			
			for (var i = 0; i < listOfDoc.length; i++)
			{
				if (listOfDoc[i].id_lot == openedfolder)
				{
					body.innerHTML = body.innerHTML +
				"<tr onclick=\""+ getredirect(listOfDoc[i].id) + "\"><td class=\"big\">" + listOfDoc[i].desc + "</td><td class=\"small\">" + listOfDoc[i].indice + "</td><td class=\"small\">" + listOfDoc[i].type +
				"</td><td class=\"small\">" + listOfDoc[i].format + "</td><td class=\"medium\">" + listOfDoc[i].date + "</td><td class=\"medium\"> " + getlibele(listOfDoc[i].archi) +
				"</td><td class=\"medium\">" + getlibele(listOfDoc[i].bet) + "</td><td class=\"medium\">" + getlibele(listOfDoc[i].bc) + "</td></tr>";
				}
			}
			print_folders();
		}
		
		function print_folders()
		{
			var list = document.getElementById("folders");
			list.innerHTML = "";
			
			for (var i = 0; i < listOfLot.length; i++)
			{
				var li = document.createElement('li');
				list.appendChild(li);
				
				if (i == openedfolder)
				{
					li.innerHTML = li.innerHTML + "<a href=\"#\">" + listOfLot[i].name + "<b class=\"raquo\">&raquo;</b></a>";
					li.className = "selected";
				}
				else
				{
					li.innerHTML = li.innerHTML + "<a href=\"#\">" + listOfLot[i].name + "<b class=\"raquo\">&raquo;</b></a>";
					li.setAttribute('onclick', 'setfolder(' + listOfLot[i].id + ');');
				}
			}
		}

	</script>
</head>
 
<body>


		<div id="header">
		
				<div id="title"><a href="index.php">STOFFEL LEFEBVRE ARCHITECTURE</a></div>
				
				<div id="subtitle">LES PIEUX / Construction du gymnase</div>
				
				<ul id="nav">

				</ul>
		</div>

	<div id="wrapper">
	
		<div id="contentleft">
	
			<div id="sidebar">
		
				<div class="side-elem">
					<h2>NOUVEAU DOCUMENT</h2>
				
					<a href="add.php"><input type="button" value="Envoyer un document" /></a>
				</div>
			
				<div class="side-elem">
					<h2>RECHERCHER</h2>
				
					<form action="search.php" method="POST">
					<input value="Rechercher" onfocus="if (this.value == 'Rechercher') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Rechercher';}"/>
					</form>
				</div>
				
				<div class="side-elem">
					<h2>NAVIGATION</h2>
				
					<ul>
					<li><a href="param.php"><span class="more">&raquo;</span>Paramètres</a></li>
					</ul>
				</div>
			</div>
		
			<div id="list">
				<ul id="folders" class="subnav">
				</ul>
			</div>
			
		</div>
		
		<div id="content">
		
			<h2>LES PIEUX / Construction du gymnase</h2>
				
			<div id="details">
				
				<p>
					<table>
					<thead>
						<th style="width: 800px;">Désignation</th>
						<th style="width: 80px;">Indice</th>
						<th style="width: 80px;">Type</th>
						<th style="width: 80px;">Format</th>
						<th style="width: 120px;">Date d'émission</th>
						<th style="width: 120px;">Réponses Architectes</th>
						<th style="width: 120px;">Réponses Bureau d'étude</th>
						<th style="width: 120px;">Réponses Bureau de contrôle</th>
					</thead>
					<tbody id="docs">
					</tbody>
					</table>
				</p>
			</div>
		</div>
	</div>
		
		<div id="footer">
		
		</div>
		
</div>
</div>

<script type="text/javascript">setfolder(0);</script>
</body>
</html>